import axios from '@/utils/http';
import base from './base';

export default {
  index(params) {
    return axios.get(
      `${base.sq}/products/${params.spaceId}/get_users`,
      {
        params: {
          nickname: params.searchName,
          page: params.page,
        },
      },
    );
  },
  setLevel(params) {
    return axios.post(
      `${base.sq}/products/${params.spaceId}/set_users`,
      {
        user_id: params.memberId,
        role: params.level,
      },
    );
  },
};
